<template>
  <div>
    <el-table
      :data="pulluserlist"
      border
      style="width: 100%"
      :header-cell-style="{ textAlign: 'center' }"
    >
      <el-table-column prop="time" label="注册时间" align="center">
      </el-table-column>
      <el-table-column prop="name" label="姓名" align="center">
      </el-table-column>
      <el-table-column prop="head" label="头像" align="center">
        <template slot-scope="scope">
          <viewer>
            <img
              :src="scope.row.head"
              class="my-img"
              style="width: 50px; height: 50px"
            />
          </viewer>
        </template>
      </el-table-column>
      <el-table-column prop="sex" label="性别" align="center">
      </el-table-column>
      <el-table-column prop="position" label="职业" align="center">
      </el-table-column>
    </el-table>
  
  </div>
</template>

<script>
import { pulluserlistAPI } from "@/api/user";
export default {
  data() {
    return {
      pulluserlist: [],
      page:0
    };
  },
  created() {
    this.getpulluserlist();
  },
  methods: {
    async getpulluserlist() {
      let res  = await pulluserlistAPI({page:this.page});
      console.log(res);
      this.pulluserlist = res.data.data.result;
    },
  },
};
</script>

<style scoped>
.my-img:hover {
  cursor: pointer;
}
</style>
